#include "dialog.h"
#include <QLabel>
#include <QPushButton>
#include <QVBoxLayout>

Dialog::Dialog(QWidget* prent) : QDialog(prent)
{
    this->show();
    this->resize(400,300);
    this->setWindowTitle("提示");
    //创建一个垂直布局
    QVBoxLayout * layout = new QVBoxLayout(this);
    QLabel * la = new QLabel("密码输入错误",this);
    QPushButton * button = new QPushButton("关闭",this);
    layout->addWidget(la);
    layout->addWidget(button);
    connect(button,&QPushButton::clicked,this,&Dialog::handle);
}

void Dialog::handle()
{
    this->close();
}
